// $ANTLR 3.4 C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g 2012-10-25 02:54:23

    package pl.CLexer;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked"})
public class CParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "DELIMITADORES", "DIGITO", "DIV", "ESPACIO", "INTEGER", "MAS", "MENOS", "MULT", "NUEVALINEA_LINUX", "NUEVALINEA_WINDOWS", "NUMERO", "PARENTESIS_ABIERTO", "PARENTESIS_CERRADO", "PUNTO_COMA", "PUNTO_DECIMAL", "REAL", "TABULADOR", "DIVISION", "MULTIPLICACION"
    };

    public static final int EOF=-1;
    public static final int DELIMITADORES=4;
    public static final int DIGITO=5;
    public static final int DIV=6;
    public static final int ESPACIO=7;
    public static final int INTEGER=8;
    public static final int MAS=9;
    public static final int MENOS=10;
    public static final int MULT=11;
    public static final int NUEVALINEA_LINUX=12;
    public static final int NUEVALINEA_WINDOWS=13;
    public static final int NUMERO=14;
    public static final int PARENTESIS_ABIERTO=15;
    public static final int PARENTESIS_CERRADO=16;
    public static final int PUNTO_COMA=17;
    public static final int PUNTO_DECIMAL=18;
    public static final int REAL=19;
    public static final int TABULADOR=20;
    public static final int DIVISION=21;
    public static final int MULTIPLICACION=22;

    // delegates
    public Parser[] getDelegates() {
        return new Parser[] {};
    }

    // delegators


    public CParser(TokenStream input) {
        this(input, new RecognizerSharedState());
    }
    public CParser(TokenStream input, RecognizerSharedState state) {
        super(input, state);
    }

    public String[] getTokenNames() { return CParser.tokenNames; }
    public String getGrammarFileName() { return "C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g"; }



      List<RecognitionException> errors = new ArrayList<RecognitionException>();

      public List<RecognitionException> getAllErrors() {
          return new ArrayList<RecognitionException>(errors);
      }
     
      public boolean hasErrors() {
          return !errors.isEmpty();
      }
      
      @Override
      public void reportError(RecognitionException e) {
          displayRecognitionError(this.getTokenNames(), e);
          errors.add(e);
      }
      



    // $ANTLR start "entrada"
    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:33:1: entrada : instrucciones EOF ;
    public final void entrada() throws RecognitionException {
        try {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:33:8: ( instrucciones EOF )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:33:10: instrucciones EOF
            {
            pushFollow(FOLLOW_instrucciones_in_entrada47);
            instrucciones();

            state._fsp--;


            match(input,EOF,FOLLOW_EOF_in_entrada49); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "entrada"



    // $ANTLR start "instrucciones"
    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:34:1: instrucciones : ( instruccion )* ;
    public final void instrucciones() throws RecognitionException {
        try {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:34:14: ( ( instruccion )* )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:34:16: ( instruccion )*
            {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:34:16: ( instruccion )*
            loop1:
            do {
                int alt1=2;
                int LA1_0 = input.LA(1);

                if ( (LA1_0==INTEGER||LA1_0==PARENTESIS_ABIERTO||LA1_0==REAL) ) {
                    alt1=1;
                }


                switch (alt1) {
            	case 1 :
            	    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:34:16: instruccion
            	    {
            	    pushFollow(FOLLOW_instruccion_in_instrucciones55);
            	    instruccion();

            	    state._fsp--;


            	    }
            	    break;

            	default :
            	    break loop1;
                }
            } while (true);


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "instrucciones"



    // $ANTLR start "instruccion"
    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:35:1: instruccion : exp PUNTO_COMA ;
    public final void instruccion() throws RecognitionException {
        try {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:35:12: ( exp PUNTO_COMA )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:35:14: exp PUNTO_COMA
            {
            pushFollow(FOLLOW_exp_in_instruccion62);
            exp();

            state._fsp--;


            match(input,PUNTO_COMA,FOLLOW_PUNTO_COMA_in_instruccion64); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "instruccion"



    // $ANTLR start "exp"
    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:36:1: exp : exp_mult ( operador_arit exp_mult )* ;
    public final void exp() throws RecognitionException {
        try {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:36:4: ( exp_mult ( operador_arit exp_mult )* )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:36:6: exp_mult ( operador_arit exp_mult )*
            {
            pushFollow(FOLLOW_exp_mult_in_exp70);
            exp_mult();

            state._fsp--;


            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:36:15: ( operador_arit exp_mult )*
            loop2:
            do {
                int alt2=2;
                int LA2_0 = input.LA(1);

                if ( ((LA2_0 >= MAS && LA2_0 <= MENOS)) ) {
                    alt2=1;
                }


                switch (alt2) {
            	case 1 :
            	    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:36:16: operador_arit exp_mult
            	    {
            	    pushFollow(FOLLOW_operador_arit_in_exp73);
            	    operador_arit();

            	    state._fsp--;


            	    pushFollow(FOLLOW_exp_mult_in_exp75);
            	    exp_mult();

            	    state._fsp--;


            	    }
            	    break;

            	default :
            	    break loop2;
                }
            } while (true);


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "exp"



    // $ANTLR start "exp_mult"
    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:37:1: exp_mult : exp_base ( operador_geo exp_base )* ;
    public final void exp_mult() throws RecognitionException {
        try {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:37:9: ( exp_base ( operador_geo exp_base )* )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:37:11: exp_base ( operador_geo exp_base )*
            {
            pushFollow(FOLLOW_exp_base_in_exp_mult83);
            exp_base();

            state._fsp--;


            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:37:20: ( operador_geo exp_base )*
            loop3:
            do {
                int alt3=2;
                int LA3_0 = input.LA(1);

                if ( ((LA3_0 >= DIVISION && LA3_0 <= MULTIPLICACION)) ) {
                    alt3=1;
                }


                switch (alt3) {
            	case 1 :
            	    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:37:21: operador_geo exp_base
            	    {
            	    pushFollow(FOLLOW_operador_geo_in_exp_mult86);
            	    operador_geo();

            	    state._fsp--;


            	    pushFollow(FOLLOW_exp_base_in_exp_mult88);
            	    exp_base();

            	    state._fsp--;


            	    }
            	    break;

            	default :
            	    break loop3;
                }
            } while (true);


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "exp_mult"



    // $ANTLR start "exp_base"
    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:38:1: exp_base : ( numero | PARENTESIS_ABIERTO exp PARENTESIS_CERRADO );
    public final void exp_base() throws RecognitionException {
        try {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:38:9: ( numero | PARENTESIS_ABIERTO exp PARENTESIS_CERRADO )
            int alt4=2;
            int LA4_0 = input.LA(1);

            if ( (LA4_0==INTEGER||LA4_0==REAL) ) {
                alt4=1;
            }
            else if ( (LA4_0==PARENTESIS_ABIERTO) ) {
                alt4=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 4, 0, input);

                throw nvae;

            }
            switch (alt4) {
                case 1 :
                    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:38:11: numero
                    {
                    pushFollow(FOLLOW_numero_in_exp_base96);
                    numero();

                    state._fsp--;


                    }
                    break;
                case 2 :
                    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:38:20: PARENTESIS_ABIERTO exp PARENTESIS_CERRADO
                    {
                    match(input,PARENTESIS_ABIERTO,FOLLOW_PARENTESIS_ABIERTO_in_exp_base100); 

                    pushFollow(FOLLOW_exp_in_exp_base102);
                    exp();

                    state._fsp--;


                    match(input,PARENTESIS_CERRADO,FOLLOW_PARENTESIS_CERRADO_in_exp_base104); 

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "exp_base"



    // $ANTLR start "numero"
    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:40:1: numero : ( REAL | INTEGER );
    public final void numero() throws RecognitionException {
        try {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:40:7: ( REAL | INTEGER )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:
            {
            if ( input.LA(1)==INTEGER||input.LA(1)==REAL ) {
                input.consume();
                state.errorRecovery=false;
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                throw mse;
            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "numero"



    // $ANTLR start "operador_arit"
    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:41:1: operador_arit : ( MAS | MENOS );
    public final void operador_arit() throws RecognitionException {
        try {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:41:14: ( MAS | MENOS )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:
            {
            if ( (input.LA(1) >= MAS && input.LA(1) <= MENOS) ) {
                input.consume();
                state.errorRecovery=false;
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                throw mse;
            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "operador_arit"



    // $ANTLR start "operador_geo"
    // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:42:1: operador_geo : ( DIVISION | MULTIPLICACION );
    public final void operador_geo() throws RecognitionException {
        try {
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:42:13: ( DIVISION | MULTIPLICACION )
            // C:\\Users\\Manuel Luis Aznar\\workspace\\practica6\\src\\main\\java\\pl\\CLexer\\CParser.g:
            {
            if ( (input.LA(1) >= DIVISION && input.LA(1) <= MULTIPLICACION) ) {
                input.consume();
                state.errorRecovery=false;
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                throw mse;
            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        return ;
    }
    // $ANTLR end "operador_geo"

    // Delegated rules


 

    public static final BitSet FOLLOW_instrucciones_in_entrada47 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_entrada49 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_instruccion_in_instrucciones55 = new BitSet(new long[]{0x0000000000088102L});
    public static final BitSet FOLLOW_exp_in_instruccion62 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_PUNTO_COMA_in_instruccion64 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_exp_mult_in_exp70 = new BitSet(new long[]{0x0000000000000602L});
    public static final BitSet FOLLOW_operador_arit_in_exp73 = new BitSet(new long[]{0x0000000000088100L});
    public static final BitSet FOLLOW_exp_mult_in_exp75 = new BitSet(new long[]{0x0000000000000602L});
    public static final BitSet FOLLOW_exp_base_in_exp_mult83 = new BitSet(new long[]{0x0000000000600002L});
    public static final BitSet FOLLOW_operador_geo_in_exp_mult86 = new BitSet(new long[]{0x0000000000088100L});
    public static final BitSet FOLLOW_exp_base_in_exp_mult88 = new BitSet(new long[]{0x0000000000600002L});
    public static final BitSet FOLLOW_numero_in_exp_base96 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_PARENTESIS_ABIERTO_in_exp_base100 = new BitSet(new long[]{0x0000000000088100L});
    public static final BitSet FOLLOW_exp_in_exp_base102 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_PARENTESIS_CERRADO_in_exp_base104 = new BitSet(new long[]{0x0000000000000002L});

}